import { Router } from 'express';
import { UserInfoController } from '../controllers/userInfoController';
import { authMiddleware } from '../middlewares/authMiddleware';
export default (): Router => {
  const router = Router();
  const userInfoController = new UserInfoController();

  // 公开路由：注册和登录

  // // 受保护的路由：需要登录才能访问
  router.post('/save', authMiddleware, userInfoController.save);
  router.get('/getInfo', authMiddleware, userInfoController.getInfo);
  router.get('/getPageData', authMiddleware, userInfoController.getPageData);

  return router;
};